//
//  LGConfirmFormBar.m
//  LuxuryGoods
//
//  Created by 刘星辰 on 2018/5/26.
//  Copyright © 2018年 Future. All rights reserved.
//

#import "LGConfirmFormBar.h"
#import "UIButton+Gradual.h"

@implementation LGConfirmFormBar

- (void)awakeFromNib
{
    [super awakeFromNib];
    [self.buyButton addGradualColorAndCorner];
}

- (IBAction)buttonClick:(id)sender
{
    if (self.buyAction)
    {
        self.buyAction();
    }
}

- (void)makeMoney:(NSString *)money
{
    self.moneyLab.text = [NSString stringWithFormat:@"￥ %@",money];
}

- (void)makeAttributedMoney:(NSString *)money
{
    NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"应付： ¥ %@",money]];
    
    [attStr addAttribute:NSFontAttributeName value:FONT(17) range:NSMakeRange(0, 6)];
    [attStr addAttribute:NSForegroundColorAttributeName value:TEXT_COLOR_1 range:NSMakeRange(0, 4)];
    
    
    self.moneyLab.attributedText = attStr;
}

@end
